/* --- TECH STACK AMBER v40.0: PREMIUM LIQUID & SUNSET GLITCH --- */
/* Оптимизацияланды: Ноутбуктан мобилдик телефонго чейин (320px - 2560px) */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,600;0,700;0,800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&display=swap');

:root {
    /* Палитра жана Негизги түстөр */
    --primary: #ffaa40;
    --secondary: #ff5e62;
    --accent: #ff9f43;
    --bg-deep: #020202;
    --bg-liquid: #050505;
    
    /* Стекло эффекти (Glassmorphism) */
    --surface: rgba(255, 255, 255, 0.02);
    --surface-hover: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.06);
    --border-highlight: rgba(255, 255, 255, 0.15);
    
    /* Свечение жана Анимациялар */
    --glow-spread: 0 0 40px rgba(255, 170, 64, 0.1);
    --ease-elastic: cubic-bezier(0.19, 1, 0.22, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-main: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--bg-liquid);
    color: #fff;
    overflow-x: hidden;
    line-height: 1.4;
}

/* --- СЕКЦИЯ ЖАНА ФОН --- */
.skills-section {
    position: relative;
    padding: clamp(80px, 15vh, 200px) 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Анимированные световые пятна (Ambient) */
.skills-section::before, 
.skills-section::after,
.ambient-light {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    z-index: 0;
    opacity: 0.15;
    pointer-events: none;
    animation: moveGlow 20s infinite alternate ease-in-out;
}

.skills-section::before, .light-1 { 
    width: clamp(300px, 40vw, 800px); 
    height: clamp(300px, 40vw, 800px); 
    background: var(--primary); 
    top: -10%; left: -10%; 
}

.skills-section::after, .light-2 { 
    width: clamp(250px, 40vw, 700px); 
    height: clamp(250px, 40vw, 700px); 
    background: var(--secondary); 
    bottom: -10%; right: -10%; 
    animation-delay: -10s; 
}

.grain-overlay {
    position: absolute; inset: 0;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.35;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 1;
}

.container {
    width: 100%;
    max-width: 1400px;
    padding: 0 clamp(20px, 4vw, 80px); /* Универсалдуу отступ */
    position: relative;
    z-index: 10;
}

/* --- ТИПОГРАФИКА (HEADER) --- */
.header-box {
    text-align: center;
    margin-bottom: clamp(50px, 10vh, 120px);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-transform: uppercase;
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
    letter-spacing: 0.2em;
    font-weight: 700;
    margin-bottom: 20px;
    padding: 8px 20px;
    background: rgba(255, 170, 64, 0.05);
    border: 1px solid rgba(255, 170, 64, 0.1);
    border-radius: 100px;
}

.title {
    font-size: clamp(2.5rem, 7vw, 6.5rem);
    font-weight: 800;
    letter-spacing: clamp(-2px, -0.2vw, -4px);
    line-height: 0.95;
    background: linear-gradient(180deg, #fff 20%, rgba(255,255,255,0.4) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: capitalize;
}

/* --- АДАПТИВНАЯ СЕТКА (GRID & BENTO) --- */
.grid-layout {
    display: grid;
    /* Умная колонка: экран кичирейгенде автоматтык түрдө 1 колонкага өтөт */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
    gap: clamp(30px, 5vw, 80px);
    align-items: center;
}

.skills-list {
    display: flex; 
    flex-direction: column;
    gap: clamp(16px, 2vw, 24px);
    width: 100%;
}

/* --- КАРТОЧКАЛАР (SKILL CARDS) --- */
.skill-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: clamp(20px, 3vw, 32px);
    padding: clamp(20px, 3.5vw, 35px);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    transition: var(--transition-main);
    overflow: hidden;
    cursor: default;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.05), transparent);
    opacity: 0; transition: 0.5s;
}

/* Свечение гана ПК үчүн (мобилдикте hover жок болот) */
@media (hover: hover) {
    .skill-card:hover {
        background: var(--surface-hover);
        border-color: rgba(255, 159, 67, 0.4);
        transform: translateY(-6px) scale(1.01);
        box-shadow: 0 20px 50px -10px rgba(0,0,0,0.6), var(--glow-spread);
    }
    .skill-card:hover::before { opacity: 1; }
    .skill-card:hover .icon-box { transform: scale(1.1) rotate(5deg); }
}

.card-top, .card-header {
    display: flex; 
    justify-content: flex-start; 
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.card-top { justify-content: space-between; gap: 0; } /* Эгер эски структура колдонулса */

.icon-box {
    width: clamp(45px, 5vw, 65px);
    height: clamp(45px, 5vw, 65px);
    background: rgba(255, 159, 67, 0.1);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    color: var(--primary);
    box-shadow: inset 0 0 20px rgba(255, 159, 67, 0.1);
    transition: 0.4s var(--ease-elastic);
}

.skill-name {
    font-weight: 700;
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    color: #fff;
}

.percent {
    font-weight: 800;
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    color: var(--primary);
}

/* --- ПРОГРЕСС БАР --- */
.progress-track, .progress-container {
    height: 8px;
    background: rgba(255,255,255,0.04);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.progress-bar, .progress-fill {
    height: 100%; 
    width: 0%; /* JS аркылуу толтурулат */
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 100px;
    position: relative;
    box-shadow: 0 0 20px rgba(255, 170, 64, 0.3);
    transition: width 2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Блик эффекти */
.progress-bar::after, .progress-fill::after {
    content: ''; position: absolute; top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    transform: translateX(-100%);
    animation: shimmer 2.5s infinite;
}

/* --- ВИЗУАЛ (3D LAPTOP & ORBIT) --- */
.visual-area, .visual-wrapper {
    position: relative;
    display: flex; 
    justify-content: center; 
    align-items: center;
    perspective: 2000px;
    width: 100%;
    min-height: clamp(300px, 40vw, 500px);
}

.orbit-center {
    position: absolute;
    width: clamp(280px, 45vw, 550px);
    height: clamp(280px, 45vw, 550px);
    display: flex; justify-content: center; align-items: center;
}

.orbit-ring, .orbit-system {
    position: absolute; 
    inset: 0;
    width: 100%; height: 100%;
    border: 1px dashed var(--border);
    border-radius: 50%;
    animation: spin 40s linear infinite;
}

/* Планеталар (Иконкалар) */
.planet {
    position: absolute;
    width: clamp(45px, 6vw, 70px); height: clamp(45px, 6vw, 70px);
    background: #0a0a0a;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    color: var(--primary);
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: anti-spin 40s linear infinite;
    transition: 0.3s;
}

.planet:hover {
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(255, 170, 64, 0.5);
    z-index: 10;
}

.p1 { top: 0; left: 50%; transform: translate(-50%, -50%); } 
.p2 { top: 50%; right: 0; transform: translate(50%, -50%); }
.p3 { bottom: 0; left: 50%; transform: translate(-50%, 50%); }
.p4 { top: 50%; left: 0; transform: translate(-50%, -50%); }

/* 3D НОУТБУК */
.laptop-3d, .laptop-frame {
    width: clamp(220px, 60%, 450px);
    z-index: 5;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 30px 50px rgba(0,0,0,0.6));
    transform-style: preserve-3d;
}

.screen {
    aspect-ratio: 16/10;
    background: #050505;
    border: 2px solid #222;
    border-radius: 12px 12px 0 0;
    padding: clamp(6px, 1.2vw, 12px);
    position: relative;
    overflow: hidden;
}

.screen::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.03), transparent);
    transform: rotate(30deg);
}

.code-editor {
    width: 100%; height: 100%;
    background: radial-gradient(circle at top left, #1a1a1a, #000);
    border-radius: 6px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    border: 1px solid rgba(255,255,255,0.05);
}

.code-text {
    font-family: 'Fira Code', monospace;
    color: var(--primary);
    font-size: clamp(0.6rem, 1vw, 1rem);
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 170, 64, 0.3);
}

.base {
    height: clamp(8px, 1.2vw, 16px);
    background: linear-gradient(to bottom, #222, #0d0d0d);
    border-radius: 0 0 16px 16px;
    border-top: 2px solid #333;
}

/* --- АНИМАЦИЯЛАР --- */
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes anti-spin { 100% { transform: rotate(-360deg); } }
@keyframes float { 
    0%, 100% { transform: translateY(0) rotateX(2deg); } 
    50% { transform: translateY(-15px) rotateX(-2deg); } 
}
@keyframes moveGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.1); }
}
@keyframes shimmer { 
    0% { transform: translateX(-100%); } 
    100% { transform: translateX(100%); } 
}

/* --- МОБИЛДИК АДАПТАЦИЯ (MASTER RESPONSIVE) --- */

/* Планшеттер жана кичине ноутбуктар */
@media (max-width: 1024px) {
    .container { padding: 0 40px; }
    .grid-layout { gap: 40px; }
}

/* Мобилдик телефондор */
@media (max-width: 768px) {
    .skills-section { padding: 100px 0; }
    .header-box { margin-bottom: 50px; }
    
    .grid-layout { 
        grid-template-columns: 1fr; /* 1 колонкага өтөт */
        gap: 50px;
    }
    
    .visual-area, .visual-wrapper { 
        order: -1; /* Ноутбук тексттин үстүнө чыгат */
        min-height: 350px;
        margin-bottom: 20px;
    }
    
    .orbit-center {
        width: 320px; height: 320px;
    }
}

/* Ультра-кичинекей телефондор (iPhone SE ж.б.) */
@media (max-width: 480px) {
    .container { padding: 0 20px; }
    .title { letter-spacing: -1px; }
    .skill-card { padding: 20px; border-radius: 24px; }
    .visual-area, .visual-wrapper { min-height: 280px; }
    
    /* Экран батпай кетпеши үчүн орбитаны кичирейтебиз */
    .orbit-center { width: 260px; height: 260px; }
    .laptop-3d, .laptop-frame { width: 180px; }
    .planet { width: 40px; height: 40px; font-size: 1.1rem; }
    
    .card-top, .card-header { gap: 15px; }
}

/* Скроллбарды жашыруу (дизайн таза болушу үчүн) */
::-webkit-scrollbar { display: none; }